import {getBaseChartConfig, simpleData} from '@/package/widget/chart/01base/util'

export default {
  name: '基础饼图',
  icon: '/img/chart/pie1.png',
  type: '饼图',
  cptKey: 'pie01',
  width: 500,
  height: 300,
  dynamic: true,
  options: {
    cptDataForm: {
      dataText: JSON.stringify(simpleData),
      dataSource: 1,
      pollTime: 0
    },
    attribute: {
      ...getBaseChartConfig(),
      tooltip: {
        show: true,
        trigger: 'item', // axis, item
        formatter: ''
      },
      gap: { // 间隙值
        show: false,
        value: 100
      },
      series: {
        radius: ['0', '70%'],
        roseType: false, // radius, area
        label: {
          show: true,
          position: 'outer', // outside, inside, center
          formatter: '{b}:{c}',
          color: '#FFF',
          fontSize: 12,
          margin: 0,
          alignTo: 'none' // none, labelLine, edge
        },
        labelLine: {
          show: true,
          smooth: false,
          lineStyle: {
            width: 1,
            type: 'solid' // solid, dashed, dotted
          }
        },
        itemStyle: {
          borderColor: '#FFF',
          borderWidth: 0,
          borderType: 'solid',
          shadowBlur: 0,
          shadowColor: '',
          shadowOffsetX: 0,
          shadowOffsetY: 0,
          opacity: 1,
          borderRadius : 0
        }

      }
    }
  }
}
